home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / misc / temgen.lha / Temgen / tg-0.11 / hash.h < prev    next >
C/C++ Source or Header  |  2002-12-18  |  458b  |  18 lines

  1. #ifndef __hash_h_
  2. #define __hash_h_
  3.  
  4. struct hash;
  5.  
  6. typedef unsigned hash_fun( const void *data );
  7. typedef int      hash_compare( const void *data1, const void *data2 );
  8.  
  9. struct hash *new_hash( unsigned size, hash_fun*, hash_compare* );
  10. void free_hash( struct hash* );
  11.  
  12. int h_add( struct hash*, void *data );
  13. int h_del( struct hash*, const void *data );
  14. void *h_get( struct hash*, const void *data );
  15. int h_foreach( struct hash*, int (*fun)(void*) );
  16.  
  17. #endif
  18.